home *** CD-ROM | disk | FTP | other *** search
- ' +----------------------------------------------------------------------+
- ' | |
- ' | PBClone Copyright (c) 1990-1993 Thomas G. Hanlin III |
- ' | |
- ' +----------------------------------------------------------------------+
-
- DECLARE SUB UnCalcAttr (Foreground%, Background%, BYVAL VAttr%)
-
- SUB GetColor (Fore%, Back%)
- Row% = CSRLIN ' get current cursor position
- Col% = POS(0)
- Ch$ = CHR$(SCREEN(1, 1)) ' save char and colors at 1, 1
- VAttr% = SCREEN(1, 1, 1)
- LOCATE 1, 1 ' print char there in current color
- PRINT Ch$;
- DefAttr% = SCREEN(1, 1, 1) ' get the current default color
- UnCalcAttr Fore%, Back%, VAttr% ' restore the old color
- COLOR Fore%, Back%
- LOCATE 1, 1
- PRINT Ch$;
- LOCATE Row%, Col%
- UnCalcAttr Fore%, Back%, DefAttr% ' return the current default color
- COLOR Fore%, Back% ' restore it as the default
- END SUB
-